home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
cprog.EXE
/
CC_1.ZIP
/
FSEEK2.C
< prev
next >
Wrap
Text File
|
1988-02-01
|
640b
|
18 lines
/*
** reposition a stream file
*/
#define FILE int
#include <streamio.h>
extern int fflush(), _seek(), free();
fseek2(stream, offset, ptrname) FILE *stream; int offset, ptrname; {
fflush(stream); /* flush any write data */
if(stream[_IOB_CNT]) { /* free read buffer if present */
free(stream[_IOB_BASE]);
stream[_IOB_CNT] = 0;
}
stream[_IOB_FLAG] &= ~(_UNGET);
_seek(stream[_IOB_FD], offset, ptrname);
return 0;
}